<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/tld/pageutil.tld" prefix="pu"%>
<%@taglib uri="/WEB-INF/tld/pageable.tld" prefix="pageable"%>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt-rt"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<table class="tb-1" >
	<thead>
		<tr>
			<th>
				服务单号
			</th>
			<th>
				服务单类别
			</th>
			<th>
				服务单状态
			</th>
			<th>
				功能
			</th>
		</tr>
	</thead>
	<tbody>
		<s:if test="%{serviceOrderList.size() == 0}">
			<tr>
				<td colspan="4">查无资料</td>
			</tr>
		</s:if>
		<s:iterator value="%{serviceOrderList}" var="serviceOrder" >
			<tr>
				<td>
					${serviceOrder.serviceId}
				</td>
				<td>
					<s:if test="%{#serviceOrder.srcType == 1}">
						<c:set var="srcTypeName" value="退货"></c:set>
					</s:if>
					<s:if test="%{#serviceOrder.srcType == 2}">
						<c:set var="srcTypeName" value="换货"></c:set>
					</s:if>
					<s:if test="%{#serviceOrder.srcType == 3}">
						<c:set var="srcTypeName" value="取消"></c:set>
					</s:if>
					${srcTypeName}
					
				</td>
				<td>
					<s:if test="%{#serviceOrder.srcType == 1}">
						<%-- 退货 --%>
						${returnStatusMenu.options[serviceOrder.orderSt].name}
					</s:if>
					<s:if test="%{#serviceOrder.srcType == 2}">
						<%-- 換货 --%>
						${changeStatusMenu.options[serviceOrder.orderSt].name}
					</s:if>
					<s:if test="%{#serviceOrder.srcType == 3}">
						取消
					</s:if>
				</td>
				<td>
		    		<a href="javascript:doAR('<c-rt:url value="/serviceOrder/page.do?iamlazy=detail&serviceId=${serviceOrder.serviceId}"/>', 'dialog');openDialog('${srcTypeName}记录',serviceOrderContent,650,500)">
			    		${srcTypeName}纪录
			    	</a> 
				</td>
			</tr>
		</s:iterator>
	</tbody>
</table>
